<template>
  <div>
    <van-cell title="选择您的预约时间" :value="date" @click="show = true" />
    <van-calendar v-model:show="show" @confirm="onConfirm" />
  </div>
</template>

<script setup>
import { ref } from 'vue'
// import { showNotify } from 'vant'

const date = ref('')
const show = ref(false)

const formatDate = (date) => {
  return `${date.getFullYear()}/${date.getMonth() + 1}/${date.getDate()}`
}
const onConfirm = (value) => {
  show.value = false
  date.value = formatDate(value)
  // showNotify({ message: '提示' })
}
</script>

<style></style>
